Problem Note 47365: Columns are named incorrectly by the XLSX driver when GETNAMES=NO is specified in PROC IMPORT
When you use the IMPORT procedure (PROC IMPORT) with the GETNAMES=NO option and the XLSX driver, the column names might be named incorrectly. For example:
proc import datafile='c:\sastest\myfile.xlsx'
dbms=xlsx
out=sasdata replace;
sheet='myclass';
getnames=no;
run;
proc print data=sasdata;
run;
When you print the table SASDATA, you see the following, where the column names are off by one letter. In some tables, column B should be column A, column C should be column B, and so on. In other cases, some columns headings are missing.
Obs B C D E F
1 Alfred M 14 69 112.5
2 Alice F 13 56.5 84
3 Barbara F 13 65.3 98
4 Carol F 14 62.8 102.5
5 Henry M 14 63.5 102.5
To resolve the problem, do one of the following:
- Install the first maintenance release of the SAS® 9.3 software (TS1M1) or a later release.
- Rename the column names to their proper names.
- Do not use the GETNAMES=NO option.
Operating System and Release Information
SAS System | SAS/ACCESS Interface to PC Files | Linux for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Solaris for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Linux | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Enterprise x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows XP Professional | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2008 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | 9.3 TS1M1 |
HP-UX IPF | 9.3 TS1M0 | 9.3 TS1M1 |
64-bit Enabled Solaris | 9.3 TS1M0 | 9.3 TS1M1 |
64-bit Enabled HP-UX | 9.3 TS1M0 | 9.3 TS1M1 |
64-bit Enabled AIX | 9.3 TS1M0 | 9.3 TS1M1 |
Windows Vista for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows Vista | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Ultimate x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Professional x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Professional 32 bit | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Home Premium x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft® Windows® for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
When you use PROC IMPORT with the XLSX driver and the GETNAMES=NO option, columns are named incorrectly.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2012-09-12 17:22:16 |
Date Created: | 2012-08-29 14:27:44 |